<%-- 
    Document   : category
    Created on : Apr 23, 2012, 3:41:45 PM
    Author     : s.rainoldi
--%>
<%@include file="/WEB-INF/includes/needs.jsp" %>
<%@include file="/WEB-INF/includes/top.jsp" %>
<%@include file="/WEB-INF/includes/left-menu.jsp" %>
<div class="main-part">

    <h1>${category.title}</h1>

    <h3>Discussions</h3>
    <div class="pagination nomarginbottom noborderbottom">
        <ul>
            <li><a href="#">Prev</a></li>
            <li><a href="#" class="selected">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">Next</a></li>
        </ul>
    </div>
    <div class="clearboth"></div>
    <ul class="discussions">
        <c:forEach items="${category.discussions}" var="discussion" varStatus="status">
            <li>
                <c:choose>
                    <c:when test="${status.last}">
                        <a href="${server_home}${discussion.url}" class="discussion last">
                    </c:when>
                    <c:otherwise>
                        <a href="${server_home}${discussion.url}" class="discussion">
                    </c:otherwise>
                </c:choose>

                    <h3>${fn:escapeXml(discussion.title)}</h3>
                    <fmt:formatDate value="${discussion.date.time}" pattern="dd/MM/yyyy HH:mm" />
                    <em></em>
                </a>
            </li>
        </c:forEach>
    </ul>
    <div class="clearboth"></div>
    <div class="pagination nomargintop nobordertop">
        <ul>
            <li><a href="#">Prev</a></li>
            <li><a href="#" class="selected">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">Next</a></li>
        </ul>
    </div>
    <h3>New Discussion</h3>
    <div class="new-message">
        <form method="post" action="${server_home}${category.url}">
            <input type="hidden" name="id_category" value="${category.id}" />
            <input type="text" name="title" />
            <textarea name="text" rows="4" cols="40" id="text-message"></textarea>
            <div class="clearboth"></div>
            <input type="submit" value="Submit" class="green" />
        </form>
        <img src="${server_static}css/style_images/noimage-user.jpg" alt="" />
    </div>
</div>
<%@include file="/WEB-INF/includes/bottom.jsp" %>